package com.ruoyi.web.controller.common;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.marry.service.ICommCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author: lb
 * @Date: 2021/12/14 14:37
 * @desc：首页数据统计
 */
@RestController
@RequestMapping
public class CountController {
    @Autowired
    private ICommCountService commCountService;

    /**
     * 首页数据统计
     *
     * @return 恋人数、用户总数、留言总数、点赞总数
     */
    @GetMapping("/count")
    public AjaxResult count() {
        return AjaxResult.success(commCountService.CommCountNumMap());
    }
}
